import { request } from '@/utils/request';

// 查询岗位列表
export function listPost(query: any) {
  return request.get({
    url: '/system/post/list',
    params: query,
  });
}

// 查询岗位详细
export function getPost(postId: string | number) {
  return request.get({
    url: '/system/post/' + postId,
  });
}

// 新增岗位
export function addPost(data: any) {
  return request.post({
    url: '/system/post',
    data: data,
  });
}

// 修改岗位
export function updatePost(data: any) {
  return request.put({
    url: '/system/post',
    data: data,
  });
}

// 删除岗位
export function delPost(postId: string | number) {
  return request.delete({
    url: '/system/post/' + postId,
  });
}
